<%@page import="java.util.*"%>
<%@page import="lab.domain.Genre"%>
<%@page extends="lab.jsp.EditGenre" errorPage="error_page.jsp"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%

    Genre genre = getData();

%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h2>Genres</h2>
        <form method="post" action="edit_genre.jsp">
            <input type="text" name="name" value="<%=genre.getName()%>"/>
            <input name="id" type="hidden" value="<%=genre.getId()%>"/>
            <input type="submit" name="save" value="Save">
            <% if (genre.getId() >= 0) { %>
                <input type="submit" name="delete" value="Delete">
            <% } %>
        </form>
    </body>
</html>
